package com.hanhai.material.device.entity;

import com.mybatisflex.annotation.*;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;
import java.util.Date;

/**
 *  实体类。
 *
 * @author youchuang
 * @since 2024/01/30 14:07:20
 */
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
@Table(value = "sys_product_record_detention_record",dataSource = "device")
public class SysProductRecordDetentionRecord implements Serializable {

    @Id
    private String id;

    private Date productDate;

    private String workPlanId;

    private String productId;

    private String productName;

    private String shortName;

    private Integer totalCount;

    private Integer goodNum;

    private Integer badNum;

    @Column(onInsertValue = "now()")
    private Date createTime;

    @Column(onUpdateValue = "now()")
    private Date updateTime;

    private String productRecordId;

    private String productRecordIntoId;

    private String productRecordShiftId;

    private String operationType;

    private String type;

    private Integer status;

    private boolean result;

    private String reason;

    private Integer num;

    private Integer nowNum;

    private String machineName;

    private String shift;

    private String createUserName;

    private String createUserId;

    private String updateUserName;

    private String updateUserId;

    private String productRecordDetentionId;

    @Column(ignore = true)
    private boolean isEdit;
    @Column(ignore = true)
    private boolean isAdd;

    private Date productDateInto;
    @Column(ignore = true)
    private int parentIndex;

    @Column(ignore = true)
    private boolean dataType;

    private String kingId;

    private String kingNo;
    @Column(ignore = true)
    private String name;

    private String machineArea;

    private String groupName;

    private String lineManager;

    private  String line;
    @RelationOneToOne(selfField = "productId",targetField = "productId",dataSource = "scheduling")
    private SysProductInfo productInfo;

    @RelationOneToOne(selfField = "productRecordId",targetField = "id",dataSource = "device")
    private SysProductRecordShift productRecordShift;

    @RelationOneToOne(selfField = "productRecordDetentionId",targetField = "id",dataSource = "device")
    private SysProductRecordDetention productRecordDetention;

    @Column(ignore = true)
    private int goodNumPeople;
    @Column(ignore = true)
    private int badNumPeople;
    private String dataId;
}
